/*
 * @Description: step2-协议条款
 * @Author: ziwei.ma
 * @Date: 2019-07-12 14:54:43
 * @Last Modified by: ziwei.ma
 * @Last Modified time: 2019-07-30 17:59:44
 */

<template>
  <div class="flex-h flex-vc argeement-warpper">
    <img
      class="check-box"
      @click="choose"
      :src="[isCheck?selected:unSelected]"
    >
    <span
      class="fontsize32"
      style="color:#ffffff"
    >我已阅读并同意</span>
    <a
      class="fontsize32"
      style="color:#FECD07"
      href="http://static.xiaobu.hk/download/jiadx/pages/bc_rule.html"
    >《包车服务协议》</a>
  </div>
</template>

<script>
import { verifyAgreement } from '../utils/formVerify'
export default {
  data() {
    return {
      isCheck: false,
      unSelected: require('../assets/CheckBox2.png'),
      selected: require('../assets/CheckedBox2.png')
    }
  },
  methods: {
    choose() {
      this.isCheck = !this.isCheck
      // this.$emit('agreementCheck', this.isCheck)
    },
    // 检验协议条款是否勾选
    _verifyAgreement() {
      return Promise.all([verifyAgreement(this.isCheck)])
    }
  },
  mounted() {
    this.$emit('agreementCheck', this.isCheck)
  },
  watch: {
  }
}
</script>

<style scoped>
.argeement-warpper {
  height: 50px;
  margin-bottom: 175px;
}
.check-box {
  width: 48px;
  height: 48px;
  margin-right: 24px;
}
</style>
